<template>
  <el-table :data="list" style="width: 100%" max-height="400">
    <el-table-column fixed prop="date" label="日期" width="150">
    </el-table-column>

    <el-table-column prop="id" label="编号" width="120">
    </el-table-column>

    <el-table-column prop="qiangtou" label="枪头" width="120">
      <template slot-scope="scope">
        <span v-if="scope.row.qiangtou==1" type="normal">正常</span>
        <span v-if="scope.row.qiangtou==0" type="innormal">损坏</span>
      </template>
    </el-table-column>

    <el-table-column prop="shuidai" label="水带" width="120">
       <template slot-scope="scope">
        <span v-if="scope.row.shuidai==1" type="normal">正常</span>
        <span v-if="scope.row.shuidai==0" type="innormal">损坏</span>
      </template> 
    </el-table-column>

    <el-table-column prop="famen" label="阀门" width="120">
      <template slot-scope="scope">
        <span v-if="scope.row.famen==1" type="normal">正常</span>
        <span v-if="scope.row.famen==0" type="innormal">损坏</span>
      </template>
     </el-table-column>
    <el-table-column prop="xfsbjq" label="消防栓报警器" width="120">
       <template slot-scope="scope">
        <span v-if="scope.row.xfsbjq==1" type="normal">正常</span>
        <span v-if="scope.row.xfsbjq==0" type="innormal">损坏</span>
      </template>
    </el-table-column>
    <el-table-column prop="mhq" label="灭火器" width="120"> <template slot-scope="scope">
        <span v-if="scope.row.mhq==1" type="normal">正常</span>
        <span v-if="scope.row.mhq==0" type="innormal">过期</span>
      </template></el-table-column>
    <el-table-column
      prop="mhqManufactureDate"
      label="灭火器生产时间"
      width="120"
    >
    </el-table-column>
    <el-table-column prop="box" label="箱体" width="120"> 
       <template slot-scope="scope">
        <span v-if="scope.row.box==1" type="normal">正常</span>
        <span v-if="scope.row.box==0" type="innormal">损坏</span>
      </template>
    </el-table-column>
    <el-table-column prop="address" label="地址" width="120"> </el-table-column>
    <el-table-column prop="remark" label="备注" width="120"> </el-table-column>
    <el-table-column prop="contacts" label="负责人" width="120">
    </el-table-column>
  </el-table>
</template>

<script>
export default {
  data() {
    return {
      list: [],
      pager: {},
    };
  },
  created() {
    this.query();
  },
  methods: {
    query() {
      this.$api_r
        .__api_list_test(this.pager)
        .then((date) => {
          console.log(date);
          this.list = date;
        })
        .catch(() => {});
    },
    deleteRow(index, rows) {
      rows.splice(index, 1);
    },
  },
};
</script>